package com.shujia

object Demo8Fun1 {

  def main(args: Array[String]): Unit = {

    def stringToInt(str: String):Int = str.toInt

    def fun(f: String => Int): Unit ={
      val i: Int = f("999")
      println(1+i)
    }

    fun(stringToInt)




  }

}
